<template>
  <view class="settings-container">
    <view class="settings-title">设置</view>
    <button class="logout-btn" @click="logout">退出登录</button>
  </view>
</template>

<script>
export default {
  name: 'SettingsPage',
  methods: {
    logout() {
      uni.removeStorageSync('token');
      uni.removeStorageSync('userInfo');
      uni.showToast({ title: '已退出登录', icon: 'success' });
      setTimeout(() => {
        uni.reLaunch({ url: '/pages/profile/profile' });
      }, 800);
    }
  }
}
</script>

<style scoped>
.settings-container {
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80rpx;
}
.settings-title {
  font-size: 40rpx;
  font-weight: bold;
  margin-bottom: 80rpx;
}
.logout-btn {
  width: 80%;
  height: 88rpx;
  background: #fc7b3e;
  color: #fff;
  font-size: 32rpx;
  border-radius: 16rpx;
  margin-top: 40rpx;
}
</style>
